<html>
<head><meta charset="utf-8"><title>num tests libcore vs. libstd · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/num.20tests.20libcore.20vs.2E.20libstd.html">num tests libcore vs. libstd</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164080833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/num%20tests%20libcore%20vs.%20libstd/near/164080833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> T. Rapp <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/num.20tests.20libcore.20vs.2E.20libstd.html#164080833">(Apr 24 2019 at 13:39)</a>:</h4>
<p>I want to add tests for some new num functions (see PR <a href="https://github.com/rust-lang/rust/issues/60192" target="_blank" title="https://github.com/rust-lang/rust/issues/60192">#60192</a>). When looking at src/libcore/tests/num and src/libstd/num.rs it is not clear to me where to put the tests.<br>
For example "saturating_add" is defined in libcore but the test is in libstd. Is this due to legacy reasons? When to put tests where?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>